
/*
 * Copyright 2002-2021 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 *版权所有2002-2021原作者。
 *
 *根据Apache许可证2.0版（“许可证”）获得许可；
 *除非符合许可证，否则不得使用此文件。
 *您可以在以下地址获取许可证副本：
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 *除非适用法律要求或书面同意，软件
 *根据许可证分发的内容是按“原样”分发的，
 *无任何明示或暗示的保证或条件。
 *有关管理权限和
 *许可证下的限制。
 */

package org.aopalliance.intercept;

import java.lang.reflect.AccessibleObject;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * This interface represents a generic runtime joinpoint (in the AOP
 * terminology).
 *
 * <p>A runtime joinpoint is an <i>event</i> that occurs on a static
 * joinpoint (i.e. a location in a program). For instance, an
 * invocation is the runtime joinpoint on a method (static joinpoint).
 * The static part of a given joinpoint can be generically retrieved
 * using the {@link #getStaticPart()} method.
 *
 * <p>In the context of an interception framework, a runtime joinpoint
 * is then the reification of an access to an accessible object (a
 * method, a constructor, a field), i.e. the static part of the
 * joinpoint. It is passed to the interceptors that are installed on
 * the static joinpoint.
 *
 * @author Rod Johnson
 * @see Interceptor
 */
/**
 *这个接口表示一个通用的运行时连接点（在AOP中
 *术语）。
 *
 *＜p＞运行时连接点是发生在静态
 *连接点（即程序中的位置）。例如
 *调用是方法的运行时连接点（静态连接点）。
 *可以一般地检索给定连接点的静态部分
 *使用｛@link#getStaticPart（）｝方法。
 *
 *＜p＞在拦截框架的上下文中，运行时连接点
 *然后是对可访问对象（a
 *方法、构造函数、字段），即
 *连接点。它被传递给安装在
 *静态连接点。
 *
 *@作者Rod Johnson
 *@参见拦截器
 */
public interface Joinpoint {

	/**
	 * Proceed to the next interceptor in the chain.
	 * <p>The implementation and the semantics of this method depends
	 * on the actual joinpoint type (see the children interfaces).
	 * @return see the children interfaces' proceed definition
	 * @throws Throwable if the joinpoint throws an exception
	 */
	/**
	 *转到链中的下一个拦截器。
	 *＜p＞此方法的实现和语义取决于
	 *在实际的连接点类型上（参见子接口）。
	 *@return查看子接口的继续定义
	 *@throws如果连接点抛出异常，则抛出
	 */
	@Nullable
	Object proceed() throws Throwable;

	/**
	 * Return the object that holds the current joinpoint's static part.
	 * <p>For instance, the target object for an invocation.
	 * @return the object (can be null if the accessible object is static)
	 */
	/**
	 *返回保存当前连接点的静态部分的对象。
	 *＜p＞例如，调用的目标对象。
	 *@return对象（如果可访问对象是静态的，则可以为空）
	 */
	@Nullable
	Object getThis();

	/**
	 * Return the static part of this joinpoint.
	 * <p>The static part is an accessible object on which a chain of
	 * interceptors is installed.
	 */
	/**
	 *返回此连接点的静态部分。
	 *＜p＞静态部分是一个可访问的对象
	 *安装了拦截器。
	 */
	@Nonnull
	AccessibleObject getStaticPart();

}
